import time
from random import uniform
setGlobalDuration(30)

env = genAdsr()

oscReceive(bus='pit', address='/pit', port=9000, portamento=.025)

sine(pitch=1, pitchVar='pit', envelope=env, amplitude=.5)

proc = startCsound()

time.sleep(1)

def pit():
    sendOscControl(value = uniform(200,800), address='/pit', port=9000)

ti1 = pattern(.5, pit, [1])
ti1.start()
ti1.play()


